<?php
    require 'SqlHelper.class.php';
    
    class AdminService{
       
    function checkuser($admin)
    {
        $sqlhelp=new Sqlhelp();
        //构建sql语句
        $sql="select password,name from admins where id=".$admin->id;
        $res=$sqlhelp->dqlsql($sql);
        if(!empty($res))
        {
            $pass=mysql_fetch_row($res);
            if(md5($admin->password)==$pass[0])
            {
                return $pass[1];
                exit();
            }
        }
        return false;
    }
    }